BatteryStatus

data class BatteryStatus(val charging: Boolean, val percent: Float = 100.0f) : Parcelable

A data object used for holding the current battery status

Constructors

Link copied to clipboard
constructor(charging: Boolean, percent: Float = 100.0f)

Properties

Link copied to clipboard

if the device is currently in a charging state

Link copied to clipboard
val percent: Float = 100.0f

The current charge of the battery in percentage

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)